gdkcairo: Add a missing flush
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 2 Sep 2014 15:29:47 +0000 (08:29 -0700)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 2 Sep 2014 18:26:55 +0000 (11:26 -0700)
Noticed by ickle on IRC. We need to flush here to make sure that the
image data we fetch is up to date.

gdk/gdkcairo.c

index 066f5c434dc858473951a5743ec0dee9efb06d05..c54121599cfcc32386360134338f86e311fccf57 100644 (file)
@@ -477,6 +477,9 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
   else
     image = cairo_surface_reference (surface);
 
+  /* Flush the surface to make sure that the rendering is up to date. */
+  cairo_surface_flush (image);
+
   data = cairo_image_surface_get_data (image);
   stride = cairo_image_surface_get_stride (image);